#pragma once
#include <vector>
#include "VertexArray.h"
#include "IndexBuffer.h"
#include "IndexBufferGL3x.h"
#include "VertexBufferAttributes.h"
#include "VertexBufferAttributesGL3x.h"
#include "VertexArrayNameGL3x.h"

namespace Renderer
{
	namespace GL3x
	{
		class VertexArrayGL3x : public VertexArray
		{
		public:
			VertexArrayGL3x();

			void Bind();

			void Clean();

			virtual VertexBufferAttributesGL3x* Attributes();

			virtual Renderer::IndexBuffer* GetIndexBuffer();

			virtual void SetIndexBuffer(Renderer::IndexBuffer* indexBuffer);

			int GetMaxinumArrayIndex();

			void Destroy() override;

		protected:
			VertexArrayNameGL3x* _name;
			VertexBufferAttributesGL3x* _attributes;
			IndexBuffer* _indexBuffer;
			bool _dirtyIndexBuffer;

		};
	}
}